package org.road0329.dlt698.axdr;

import org.road0329.dlt698.asn1.axdr.AxdrOctetString;

import java.util.Arrays;

public class Float32 extends AxdrOctetString {
    private static final int LENGTH = 4;
    private byte[] octetString = new byte[LENGTH];

    public Float32() {
        // The constructor doesn't need to do anything in this case,
        // since the octetString array is already initialized with the correct size.
    }

    public void setAll(byte[] octetString) {
        if (octetString.length == LENGTH) {
            this.octetString = Arrays.copyOf(octetString, LENGTH);
        } else {
            throw new IllegalArgumentException("OctetString must be exactly " + LENGTH + " bytes long.");
        }
    }
}



